package cn.itcast.hotel.service;

import cn.itcast.hotel.pojo.Hotel;
import cn.itcast.hotel.pojo.PageResult;
import cn.itcast.hotel.pojo.RequestParams;
import com.baomidou.mybatisplus.extension.service.IService;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.search.builder.SearchSourceBuilder;

import java.util.List;
import java.util.Map;

public interface IHotelService extends IService<Hotel> {
//    分布式查询数据
     PageResult getHoltelRequestParam(RequestParams requestParams);

    //   解析分布式数据
    PageResult handHotel(SearchResponse search);

    Map<String, List<String>> getFilters(RequestParams params);

    /**
     * 实现搜索框自动补全
     * @param prefix
     * @return
     */
    List<String> getSuggestions(String prefix);
}
